﻿using System.Xml.Serialization;

namespace Batman.CasServer.Models
{
    [XmlRoot(ElementName = "serviceResponse", Namespace = "cas")]
    public class CasSuccessResponse
    {
        [XmlElement(ElementName = "authenticationSuccess", Namespace = "cas")]
        public AuthenticationSuccess AuthenticationSuccess { get; set; }
    }

    [XmlRoot(ElementName = "authenticationSuccess", Namespace = "cas")]
    public class AuthenticationSuccess
    {
        [XmlElement(ElementName = "user", Namespace = "cas")]
        public string username { get; set; }

        [XmlElement(ElementName = "proxyGrantingTicket", Namespace = "cas")]
        public string Ticket { get; set; }

        [XmlElement(ElementName = "roleId", Namespace = "cas")]
        public string RoleId { get; set; }

        [XmlElement(ElementName = "attributes", Namespace = "cas")]
        public CustomClains Clains { get; set; }
    }

    /// <summary>
    /// 其他的身份信息
    /// </summary>
    public class CustomClains
    {
        public string RoleId { get; set; }
    }
}
